home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / haskell / glasgow / ghc-src.lha / ghc-0.16 / STARTUP-ghc < prev    next >
Text File  |  1992-12-04  |  3KB  |  89 lines

  1. #! /bin/sh
  2. #
  3. # die quickly if anything goes astray...
  4. set -e
  5.  
  6. PROJECT=ghc
  7.  
  8. echo '*******************************************************************'
  9. echo "* A script to help you get $PROJECT going..."
  10. echo '*******************************************************************'
  11. echo '* I hope that you read the relevant documentation and tweaked the *'
  12. echo '* appropriate configuration files _BEFORE_ you started running    *'
  13. echo '* this!                                                           *'
  14. echo '*******************************************************************'
  15.  
  16. if [ $# != 1 ] ; then
  17.     echo ''
  18.     echo 'Please give exactly one argument, a "setup" name.'
  19.     echo 'Choices include (see install guide): std, full.'
  20.     exit 1
  21. fi
  22. # OK, I'll take that one...
  23. SETUP=$1
  24.  
  25. # figure out the absolute pathname of the "top" directory
  26. # (the one which has "mkworld", "nofib", "grasp-utils", etc., as subdirs)
  27. hardtop=`pwd`
  28. hardtop=`echo $hardtop | sed 's|^/tmp_mnt/|/|' | sed 's|^/export/|/|' | sed 's|^/grasp_tmp|/local/grasp_tmp|'`
  29. echo ''
  30. echo "*** I decided the top of your build tree is: $hardtop"
  31.  
  32. # make "mkworld", "literate", and "grasp-utils" (no special configuration)
  33.  
  34. #    make all the Makefiles first
  35.  
  36. for i in mkworld grasp-utils literate ; do
  37.     if [ -h $i ] ; then
  38.     echo '' ;
  39.     echo "*** $i is a symlink; skipping over..."
  40.     else
  41.     ( set -e;                                    \
  42.       cd $i ;                                    \
  43.       echo '' ;                                    \
  44.       echo "*** configuring $i ..." ;                        \
  45.       make -f Makefile.BOOT BOOT_DEFINES="-P none -S std -DTopDirPwd=$hardtop";    \
  46.       echo '' ;                                    \
  47.       echo "*** making Makefiles in $i ..." ;                    \
  48.       make Makefiles                                 \
  49.     )
  50.     fi
  51. done
  52.  
  53. #    now make the dependencies and Real Stuff
  54.  
  55. for i in mkworld literate grasp-utils ; do
  56.     if [ ! -h $i ] ; then
  57.     ( set -e;                                    \
  58.       cd $i ;                                    \
  59.       echo '' ;                                    \
  60.       echo "*** making make dependencies in $i ..." ;                \
  61.       make depend ;                                    \
  62.       echo '' ;                                    \
  63.       echo "*** making all in $i ..." ;                        \
  64.       make all                                    \
  65.     )
  66.     fi
  67. done
  68.  
  69. # OK, now make the $PROJECT Makefiles (and the dependencies)
  70. cd $PROJECT
  71.  
  72. make -f Makefile.BOOT BOOT_DEFINES="-P $PROJECT -S $SETUP -C mkworld -DTopDirPwd=$hardtop"
  73.  
  74. echo ''
  75. echo "*** configuring $PROJECT project itself (it takes a while :-() ..."
  76. make Makefile
  77. make Makefiles
  78.  
  79. echo ''
  80. echo "*** adding Makefile dependencies for $PROJECT project ..."
  81. make depend
  82.  
  83. echo ''
  84. echo '*******************************************************************'
  85. echo "* Hallelujah! You should be able to proceed with $PROJECT, setup $SETUP."
  86. echo "* (Please consult the documentation.)"
  87. echo '*******************************************************************'
  88. exit 0
  89.